﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

namespace SpiralClockDemo
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            events = new ObservableCollection<Event>();
            events.Add(new Event(new DateTime(2011, 10, 10, 23, 45, 1, DateTimeKind.Local)));
            events.Add(new Event(new DateTime(2011, 10, 10, 12, 0, 1, DateTimeKind.Local)));
            events.Add(new Event(new DateTime(2011, 10, 10, 15, 1, 1, DateTimeKind.Local)));
            events.Add(new Event(new DateTime(2011, 10, 10, 16, 15, 1, DateTimeKind.Local)));
            events.Add(new Event(new DateTime(2011, 10, 10, 18, 27, 1, DateTimeKind.Local)));



            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
        }


        ObservableCollection<Event> events;
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            spiralClock.ItemsSource = events;
        }

        private void TextBlock_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
           // events[0].When = new DateTime(2000, 2, 3, 10, 30, 1);
           // events.Add(new Event(new DateTime(2011, 10, 10, 2, 27, 1, DateTimeKind.Local)));
        }




    }
}
